package com.ruoyi.buss.controller;

import com.ruoyi.buss.domain.AccountingVO;
import com.ruoyi.buss.service.impl.AccountingService;
import com.ruoyi.buss.service.impl.ReportService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.List;

/**
 * Author : ChenBei
 * Date : 2021/10/8 10:23
 * Description : 账务信息-报表
 **/
@RestController
@RequestMapping("/v1/report/accounting")
public class ReportController extends BaseController {
    @Autowired
    private ReportService reportService;

    /**
     * 分页账号报表
     */
    @GetMapping("/list")
    public TableDataInfo list(AccountingVO vo)
    {
        List<AccountingVO> list = reportService.accountingReport(vo);
        return getDataTable(list);
    }

    /**
     * 分页账号报表
     */
    @GetMapping("/monList")
    public AjaxResult monList(AccountingVO vo)
    {
        return reportService.reportMon(vo);
    }
}
